<template>
  <div class="login-container">
    <el-card class="login-card">
      <h2>AI Agent 管理后台</h2>
      <el-form :model="form">
        <el-form-item>
          <el-input v-model="form.phone" placeholder="手机号" />
        </el-form-item>
        <el-form-item>
          <el-input v-model="form.password" type="password" placeholder="密码" />
        </el-form-item>
        <el-button type="primary" style="width: 100%" @click="handleLogin">
          登录
        </el-button>
      </el-form>
    </el-card>
  </div>
</template>

<script setup>
import { reactive } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const form = reactive({
  phone: '',
  password: ''
})

const handleLogin = () => {
  // 简化登录逻辑
  localStorage.setItem('admin_token', 'mock-token')
  router.push('/')
}
</script>

<style scoped>
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  width: 400px;
  text-align: center;
}

h2 {
  margin-bottom: 30px;
}
</style>

